package com.jpush.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.os.Handler;

import cn.jpush.android.api.JPushInterface;

public class MainActivity extends AppCompatActivity {

    Handler m_myHandler = new Handler();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        m_myHandler.postDelayed(new Runnable() {
            @Override
            public void run() {
                JPushInterface.init(getApplicationContext());
                JPushInterface.setAlias(getApplicationContext(), 1, "y2");
            }
        }, 2000);
    }
}
